Optimal. Leaf size=82 \[ -\frac {a^2 \sqrt {c+d x^2}}{c x}-\frac {b (b c-4 a d) \tanh ^{-1}\left (\frac {\sqrt {d} x}{\sqrt {c+d x^2}}\right )}{2 d^{3/2}}+\frac {b^2 x \sqrt {c+d x^2}}{2 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.05, antiderivative size = 82, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 24, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.167, Rules used = {462, 388, 217, 206} \[ -\frac {a^2 \sqrt {c+d x^2}}{c x}-\frac {b (b c-4 a d) \tanh ^{-1}\left (\frac {\sqrt {d} x}{\sqrt {c+d x^2}}\right )}{2 d^{3/2}}+\frac {b^2 x \sqrt {c+d x^2}}{2 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 206
Rule 217
Rule 388
Rule 462
Rubi steps
\begin {align*} \int \frac {\left (a+b x^2\right )^2}{x^2 \sqrt {c+d x^2}} \, dx &=-\frac {a^2 \sqrt {c+d x^2}}{c x}+\frac {\int \frac {2 a b c+b^2 c x^2}{\sqrt {c+d x^2}} \, dx}{c}\\ &=-\frac {a^2 \sqrt {c+d x^2}}{c x}+\frac {b^2 x \sqrt {c+d x^2}}{2 d}-\frac {(b (b c-4 a d)) \int \frac {1}{\sqrt {c+d x^2}} \, dx}{2 d}\\ &=-\frac {a^2 \sqrt {c+d x^2}}{c x}+\frac {b^2 x \sqrt {c+d x^2}}{2 d}-\frac {(b (b c-4 a d)) \operatorname {Subst}\left (\int \frac {1}{1-d x^2} \, dx,x,\frac {x}{\sqrt {c+d x^2}}\right )}{2 d}\\ &=-\frac {a^2 \sqrt {c+d x^2}}{c x}+\frac {b^2 x \sqrt {c+d x^2}}{2 d}-\frac {b (b c-4 a d) \tanh ^{-1}\left (\frac {\sqrt {d} x}{\sqrt {c+d x^2}}\right )}{2 d^{3/2}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.08, size = 76, normalized size = 0.93 \[ \sqrt {c+d x^2} \left (\frac {b^2 x}{2 d}-\frac {a^2}{c x}\right )-\frac {b (b c-4 a d) \log \left (\sqrt {d} \sqrt {c+d x^2}+d x\right )}{2 d^{3/2}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.79, size = 165, normalized size = 2.01 \[ \left [-\frac {{\left (b^{2} c^{2} - 4 \, a b c d\right )} \sqrt {d} x \log \left (-2 \, d x^{2} - 2 \, \sqrt {d x^{2} + c} \sqrt {d} x - c\right ) - 2 \, {\left (b^{2} c d x^{2} - 2 \, a^{2} d^{2}\right )} \sqrt {d x^{2} + c}}{4 \, c d^{2} x}, \frac {{\left (b^{2} c^{2} - 4 \, a b c d\right )} \sqrt {-d} x \arctan \left (\frac {\sqrt {-d} x}{\sqrt {d x^{2} + c}}\right ) + {\left (b^{2} c d x^{2} - 2 \, a^{2} d^{2}\right )} \sqrt {d x^{2} + c}}{2 \, c d^{2} x}\right ] \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.46, size = 93, normalized size = 1.13 \[ \frac {\sqrt {d x^{2} + c} b^{2} x}{2 \, d} + \frac {2 \, a^{2} \sqrt {d}}{{\left (\sqrt {d} x - \sqrt {d x^{2} + c}\right )}^{2} - c} + \frac {{\left (b^{2} c \sqrt {d} - 4 \, a b d^{\frac {3}{2}}\right )} \log \left ({\left (\sqrt {d} x - \sqrt {d x^{2} + c}\right )}^{2}\right )}{4 \, d^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.01, size = 88, normalized size = 1.07 \[ \frac {2 a b \ln \left (\sqrt {d}\, x +\sqrt {d \,x^{2}+c}\right )}{\sqrt {d}}-\frac {b^{2} c \ln \left (\sqrt {d}\, x +\sqrt {d \,x^{2}+c}\right )}{2 d^{\frac {3}{2}}}+\frac {\sqrt {d \,x^{2}+c}\, b^{2} x}{2 d}-\frac {\sqrt {d \,x^{2}+c}\, a^{2}}{c x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.88, size = 73, normalized size = 0.89 \[ \frac {\sqrt {d x^{2} + c} b^{2} x}{2 \, d} - \frac {b^{2} c \operatorname {arsinh}\left (\frac {d x}{\sqrt {c d}}\right )}{2 \, d^{\frac {3}{2}}} + \frac {2 \, a b \operatorname {arsinh}\left (\frac {d x}{\sqrt {c d}}\right )}{\sqrt {d}} - \frac {\sqrt {d x^{2} + c} a^{2}}{c x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 1.46, size = 125, normalized size = 1.52 \[ \left \{\begin {array}{cl} \frac {-a^2+2\,a\,b\,x^2+\frac {b^2\,x^4}{3}}{\sqrt {c}\,x} & \text {\ if\ \ }d=0\\ \frac {2\,a\,b\,\ln \left (\sqrt {d}\,x+\sqrt {d\,x^2+c}\right )}{\sqrt {d}}+\frac {b^2\,x\,\sqrt {d\,x^2+c}}{2\,d}-\frac {a^2\,\sqrt {d\,x^2+c}}{c\,x}-\frac {b^2\,c\,\ln \left (2\,\sqrt {d}\,x+2\,\sqrt {d\,x^2+c}\right )}{2\,d^{3/2}} & \text {\ if\ \ }d\neq 0 \end {array}\right . \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 8.04, size = 155, normalized size = 1.89 \[ - \frac {a^{2} \sqrt {d} \sqrt {\frac {c}{d x^{2}} + 1}}{c} + 2 a b \left (\begin {cases} \frac {\sqrt {- \frac {c}{d}} \operatorname {asin}{\left (x \sqrt {- \frac {d}{c}} \right )}}{\sqrt {c}} & \text {for}\: c > 0 \wedge d < 0 \\\frac {\sqrt {\frac {c}{d}} \operatorname {asinh}{\left (x \sqrt {\frac {d}{c}} \right )}}{\sqrt {c}} & \text {for}\: c > 0 \wedge d > 0 \\\frac {\sqrt {- \frac {c}{d}} \operatorname {acosh}{\left (x \sqrt {- \frac {d}{c}} \right )}}{\sqrt {- c}} & \text {for}\: d > 0 \wedge c < 0 \end {cases}\right ) + \frac {b^{2} \sqrt {c} x \sqrt {1 + \frac {d x^{2}}{c}}}{2 d} - \frac {b^{2} c \operatorname {asinh}{\left (\frac {\sqrt {d} x}{\sqrt {c}} \right )}}{2 d^{\frac {3}{2}}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________